package a.f;

import a.c.d;
import a.c.m;
import a.c.v;
import a.c.z;
import a.d.k;
import a.d.w;

public class hb
  extends r
{
  private double g = 2.0D;
  private boolean h;
  public static boolean i;
  
  public boolean canLayout(o paramo)
  {
    return true;
  }
  
  public double b()
  {
    return this.g;
  }
  
  public void a(double paramDouble)
  {
    this.g = paramDouble;
  }
  
  public boolean c()
  {
    return this.h;
  }
  
  public void a(boolean paramBoolean)
  {
    this.h = paramBoolean;
  }
  
  public void doLayout(o paramo)
  {
    boolean bool = o.eg;
    int k = o.dg;
    a(paramo);
    m localm = paramo.w();
    label148:
    label150:
    label308:
    label332:
    label337:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      zb localzb = paramo.b(locald);
      if (localzb.a() >= 1)
      {
        z localz = new z();
        localz.add(paramo.r(locald));
        int j = 0;
        do
        {
          do
          {
            if (j >= localzb.a()) {
              break;
            }
            if (bool) {
              break label150;
            }
            localz.add(localzb.a(j));
            j++;
            if (k != 0) {
              break label148;
            }
          } while (k == 0);
          localz.add(paramo.s(locald));
        } while (bool);
        j = localz.size();
        Object localObject1 = localz.f();
        Object localObject2 = (w)((v)localObject1).c();
        Object localObject3 = ((v)localObject1).a();
        Object localObject4 = (w)((v)localObject3).c();
        Object localObject5 = ((v)localObject3).a();
        do
        {
          if (localObject5 == null) {
            break;
          }
          w localw = (w)((v)localObject5).c();
          v localv = ((v)localObject5).a();
          if (bool) {
            break label337;
          }
          if (k != 0) {
            break label332;
          }
          if (a((w)localObject2, (w)localObject4, localw))
          {
            localz.h((v)localObject3);
            if (bool) {
              continue;
            }
            if (k == 0) {}
          }
          else
          {
            if (!bool)
            {
              if (a(a((w)localObject2), a((w)localObject4), a(localw))) {
                localz.h((v)localObject3);
              }
            }
            else
            {
              if (bool) {
                continue;
              }
              if (k == 0) {
                break label308;
              }
            }
            localObject1 = localObject3;
            localObject2 = localObject4;
          }
          localObject3 = localObject5;
          localObject4 = localw;
          localObject5 = localv;
        } while (k == 0);
        if (bool) {
          continue;
        }
        if (j != localz.size())
        {
          localz.b();
          localz.e();
          paramo.b(locald, localz);
        }
      }
      localm.f();
    } while (k == 0);
  }
  
  private boolean a(w paramw1, w paramw2, w paramw3)
  {
    boolean bool = o.eg;
    if ((bool) || (k.d(paramw1, paramw2, paramw3))) {
      if (!bool) {
        if (this.h) {
          if (bool) {
            break label47;
          }
        }
      }
    }
    label47:
    return b(paramw1, paramw2, paramw3);
  }
  
  private boolean b(w paramw1, w paramw2, w paramw3)
  {
    boolean bool = o.eg;
    if (!bool) {}
    if (!bool) {}
    if ((paramw1.a > paramw2.a ? 1 : 0) == (paramw2.a > paramw3.a ? 1 : 0))
    {
      if (!bool) {}
      if (bool) {}
    }
    return (paramw1.b > paramw2.b ? 1 : 0) == (paramw2.b > paramw3.b ? 1 : 0);
  }
  
  private w a(w paramw)
  {
    double d1 = Math.pow(10.0D, this.g);
    double d2 = Math.rint(paramw.a() * d1) / d1;
    double d3 = Math.rint(paramw.b() * d1) / d1;
    return new w(d2, d3);
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.hb
 * JD-Core Version:    0.7.0.1
 */